
</div>
<div class="row">
			<div id="footer" class="col-12">
				2014 &copy; Admin. Brought to you by <a href="<?php echo base_url();?>">Hiếu Phạm Trung</a>
			</div>
</div>

<div id="delete" class="modal fade">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button data-dismiss="modal" class="close" type="button">×</button>
					<h3>Xác nhận xóa</h3>
				</div>
				<div class="modal-body">
					<p>Bạn có chắc chắn muốn xóa</p>
				</div>
				<input type="text" value="" class="input_url_delete hide">
				<input type="text" value="" class="input_id_delete hide">
				<div class="modal-footer">
					<a data-dismiss="modal" class="btn btn-primary btn-small ajax" href="#">Confirm</a>
					<a data-dismiss="modal" class="btn btn-default btn-small" href="#">Cancel</a>
				</div>
			</div>
		</div>
</div>
<script type="text/javascript" charset="utf-8">
    $(document).ready(function() {
	$('.ajax').click(function(e){
	var url_delete = $(".input_url_delete").val();
	var id_delete = $(".input_id_delete").val();
	jQuery.ajax({
		type:"POST",
		url: url_delete,
		data: "",
		success:function(response){
				if(response.length < 2){
					  $("#"+id_delete+"> td").css("background-color", "#ff0");
						$( "#"+id_delete+"> td").fadeOut( "slow");
					}
					else{
					alert(response);
					}
		}
	});
    });
	$('.delete').click(function(e){
		var url = $(this).attr("rel_url");
		$(".input_url_delete").val(url);
		$(".input_id_delete").val($(this).attr("rel_id"));
    });
    });


</script>

</body>
</html>